package com.zhixue.content.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zhixue.content.model.dto.CoursePreviewDto;
import com.zhixue.content.model.po.CoursePublish;

import java.io.File;

/**
 * @author Dragon
 * @description 课程发布相关
 * @since 2023-09-15
 */
public interface CoursePublishService {


    /**
     * 获取课程预览信息
     * @param courseId
     * @return
     */
    CoursePreviewDto getCoursePreviewInfo(Long courseId);


    /**
     * 提交课程审核
     * @param companyId
     * @param courseId
     */
    void commitAudit(Long companyId, Long courseId);



    /**
     * 发布课程
     * @param companyId
     * @param courseId
     */
    void publishCourse(Long companyId, Long courseId);


    /**
     * 生成静态页面
     * @param courseId
     * @return
     */
    File generateCourseHtml(Long courseId);


    /**
     * 将静态页面上传至MinIO
     * @param courseId
     * @param file
     */
    void uploadCourseHtml(Long courseId, File file);


    /**
     * 将课程信息上传至ElasticSearch
     * @param courseId
     * @return
     */
    Boolean saveCourseIndex(Long courseId);


    /**
     * 查询课程发布信息
     * @param courseId
     * @return
     */
    CoursePublish getCoursePublish(Long courseId);
}
